package top.haijunit.work.core.doamin;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghaijun
 * @date 2024/6/30 18:52
 * @description [一句话描述该类的功能]
 */
@Getter
@Setter
public abstract class TreeNode<T, S> {


    @Schema(description = "子级", hidden = true)
    private List<T> children = new ArrayList<>();

    /**
     * 获取当前元素Id
     */
    public abstract S getId();

    /**
     * 获取父元素Id
     */
    public abstract S getParentId();

}
